package com.lzy.pattern.observer.userdefined;

/**
 * @ClassName: Client
 * @Description: 观察者模式
 * @Author: LiuZy
 * @Date: 2022/5/1 15:52
 * @Version: 1.0
 */
public class Client {

    public static void main(String[] args) {

        Subject subject = new SubscriptionSubject();
        subject.attach(new WeixinUser("猪八戒"));
        subject.attach(new WeixinUser("孙悟空"));
        subject.attach(new WeixinUser("沙僧"));
        subject.attach(new WeixinUser("唐三藏"));

        subject.notify("去取经啦");
    }

}